package vo

import (
	"time"
	"ylb/entity"
)

type JobInsertVo struct {
	Classify int       `json:"classify,omitempty"`
	Collect  bool      `json:"collect,omitempty"`
	Expire   time.Time `json:"expire"`
	Name     string    `json:"name,omitempty"`
	Note     string    `json:"note,omitempty"`
	UserId   uint      `json:"userId,omitempty"`
}

func (jobVo JobInsertVo) ParseJob() *entity.Job {
	return &entity.Job{
		Name:     jobVo.Name,
		Classify: jobVo.Classify,
		Expire:   jobVo.Expire,
		Note:     jobVo.Note,
		UserId:   jobVo.UserId,
		Collect:  jobVo.Collect,
	}
}
